﻿using System;
using System.AddIn.Pipeline;

namespace RootfusAddinView
{
    /// <summary>
    /// For pin, what sort of a connection is it?
    /// </summary>
    public enum PinConnectionType {
        /// <summary>
        /// This pin can have an infinite number of incoming connections. For example, if you want to allow a large
        /// number of incoming histograms.
        /// </summary>
        PinInfinite,
        /// <summary>
        /// This pin may have only a single input (number, string, etc.). Can't deal with multiple sources.
        /// </summary>
        PinSingle
    };

    /// <summary>
    /// Definition for an input or output pin.
    /// </summary>
    [AddInBase()]
    public abstract class PinDefinition
    {
        /// <summary>
        /// Pin name to be displayed to user. Had better be unique! :-)
        /// </summary>
        public abstract string Name
        {
            get;
        }

        /// <summary>
        /// Should return the type of the pin that you are providing here. The default
        /// is to return a single pin connection.
        /// </summary>
        public virtual PinConnectionType ConnectionType
        {
            get { return PinConnectionType.PinSingle; }
        }
    }
}
